package xx.jwt.controller;


import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.extension.api.ApiController;
import com.baomidou.mybatisplus.extension.api.R;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import org.springframework.web.bind.annotation.*;
import org.springframework.web.servlet.ModelAndView;
import xx.jwt.entity.User;
import xx.jwt.service.UserService;
import xx.jwt.util.UserThreadLocal;


import javax.annotation.Resource;
import java.util.List;

/**
 * (User)表控制层
 *
 * @author halo-king
 * @since 2023-05-05 17:20:43
 */
@RestController
@RequestMapping("user")
public class UserController extends ApiController {
    /**
     * 服务对象
     */
    @Resource
    private UserService userService;

    /**
     * 获取用户信息
     * @return
     */
    @GetMapping("getUserInfo")
    public R getUserInfo() {
        return success(UserThreadLocal.get());
    }
}
